unit basicio_output;

{$mode objfpc}{$H+}

{
  This is the output class for the IO, it handles all the actions the ki wishs to do
}

interface

uses
  Classes, SysUtils, basicio_City, basicio_street, basicio_resources,
  basicio_trade, basicio_field, logger;

type
  { TIOOutput }
  TIOOutput = class
  private
  public
    constructor Create;
    destructor Destroy; override;
  public
    procedure MoveThief(APos: TFieldPosition); virtual;
    procedure ThiefCity(APos: TCityPosition); virtual;
    procedure ThrowRes(ARes: TResources); virtual;
    procedure BuildStreet(APos: TStreetPosition); virtual;
    procedure BuildCity(APos: TCityPosition); virtual;
    procedure ExtendCity(APos: TCityPosition); virtual;
    procedure TradeResult(AResult: boolean); virtual;
    procedure GenerateTradeOffer(AOffer: TTradeOffer); virtual;
    procedure EndTurn; virtual;
    procedure BuildInvention; virtual; abstract;
  end;


implementation

uses
  SystemManager;

{ TIOOutput }

constructor TIOOutput.Create;
begin
  inherited;
end;

destructor TIOOutput.Destroy;
begin
  inherited Destroy;
end;

procedure TIOOutput.MoveThief(APos: TFieldPosition);
begin
    GlobalSystemManager.Log.Log('Moving thief to '+FieldPositionToString(APos),TLSS_IO);
end;

procedure TIOOutput.ThiefCity(APos: TCityPosition);
begin
    GlobalSystemManager.Log.Log('Stealing from the city at '+CityPositionToString(APos),TLSS_IO);
end;

procedure TIOOutput.ThrowRes(ARes: TResources);
begin

end;

procedure TIOOutput.BuildStreet(APos: TStreetPosition);
begin
    GlobalSystemManager.Log.Log('Building a street between cities ('+CityPositionToString(APos[0])+') and ('+CityPositionToString(APos[1])+')',TLSS_IO);
end;

procedure TIOOutput.BuildCity(APos: TCityPosition);
begin
    GlobalSystemManager.Log.Log('Building city at '+CityPositionToString(APos),TLSS_IO);
end;

procedure TIOOutput.ExtendCity(APos: TCityPosition);
begin
    GlobalSystemManager.Log.Log('Extending city at '+CityPositionToString(APos),TLSS_IO);
end;

procedure TIOOutput.TradeResult(AResult: boolean);
begin

end;

procedure TIOOutput.GenerateTradeOffer(AOffer: TTradeOffer);
begin

end;

procedure TIOOutput.EndTurn;
begin

end;

end.

